package com.sk.sqd;

import java.util.ArrayList;
import java.util.List;

public class CommandClient {

    public static void main(String[] args) {
        // 命令的接收者
        List<Receiver> receiverList = new ArrayList<>();
        Receiver receiver = new Receiver();
        receiver.setName("张三");
        Receiver receiver2 = new Receiver();
        receiver2.setName("李四");
        receiverList.add(receiver);
        receiverList.add(receiver2);
        // 具体命令
        ConcreteCommand concreteCommand = new ConcreteCommand();
        concreteCommand.setReceiverList(receiverList);
        // 要执行的命令
        Invoker invoker = new Invoker();
        invoker.setCommand(concreteCommand);
        //执行具体命令
        invoker.executeCommand();
    }

}
